#include "GMath.h"

#include <math.h>

namespace GMath
{

	float SinF(float Radians)
	{
		return sinf(Radians);
	}

	float CosF(float Radians)
	{
		return cosf(Radians);
	}

	float TanF(float Radians)
	{
		return tanf(Radians);
	}

	float CotF(float Radians)
	{
		return 1.0f / tanf(Radians);
	}

	float ArcSinF(float Radians)
	{
		return asinf(Radians);
	}

	float ArcCosF(float Radians)
	{
		return acosf(Radians);
	}

	float ArcTanF(float Radians)
	{
		return atanf(Radians);
	}

	float ArcTan2F(float Adj, float Opp)
	{
		return atan2f(Opp, Adj);
	}

	float DegreeToRadianF(float Degrees)
	{
		return Degrees * G_PI / 180.0f;
	}

	float RadianToDegreeF(float Radians)
	{
		return Radians * 180.0f / G_PI;
	}

	float CeilF(float Value)
	{
		return ceilf(Value);
	}

	float FloorF(float Value)
	{
		return floorf(Value);
	}

	float AbsF(float Value)
	{
		return fabsf(Value);
	}

	float ModF(float Value, float Base)
	{
		return fmodf(Value, Base);
	}

	float LogF(float Value)
	{
		return logf(Value);
	}

	float Log10F(float Value)
	{
		return log10f(Value);
	}

	float ExpF(float Value)
	{
		return expf(Value);
	}

	float SqrtF(float Value)
	{
		return sqrtf(Value);
	}

	float PowF(float Base, float Exp)
	{
		return powf(Base, Exp);
	}

	bool EqualF(float Value1, float Value2)
	{
		return fabsf(Value1 - Value2) < G_ZERO_TRESHOLD;
	}

	float SaturateF(float Value)
	{
		return Clamp(0.0f, 1.0f, Value);
	}

}